<template>
	<el-dialog :visible.sync="options.showDialog" width="500px" @close="options.showDialog = false">
		<div style="padding: 20px;">
			<p style="font-size: 20px; margin-bottom: 20px;">提示</p>
			<div style="margin-top: 10px;">
				<el-input type="textarea" :rows="2" placeholder="请输入下架理由" v-model="remark"></el-input>
			</div>
			<div class="warn-dialog-btn">
				<el-button style="margin-right: 30px;" @click="options.showDialog = false">取消</el-button>
				<el-button type="primary" @click="sendRemove">确定</el-button>
			</div>
		</div>
	</el-dialog>
</template>

<script>
export default{
	props:{
		options:{
			type: Object,
			require: true
		}
	},
	data(){
		return {
			remark: '',											//下架理由
		}
	},
	methods:{
		/* 发送下架理由 */
		sendRemove(){
			if(!this.remark){
				this.$message.warning('请输入下架理由！');
			}else{
				this.$emit('subPutDown',this.remark);
			}
		},
		/* 清除数据 */
		clearData(){
			this.remark = '';
		}
	}
}
</script>

<style scoped="scoped">
.warn-dialog-btn {margin-top: 165px;text-align: center;}
</style>
